<include file="Public/header" />
<title>管理员列表</title>
<script src="__PUBLIC__/highcharts/highcharts.js"></script>
</head>
<body>

<div class="pd-20">

	<div class="cl pd-5 mt-20"> 
		<form class="formleft"  action="__URL__/pushorder/" method="post">
			<select name="come_from" class="input-text select" style="width:150px;float:left;">
                <option value="0">平台名称</option>
				<option value="1" <if condition="I('come_from') eq 1">selected</if> >vxmore</option>
				<option value="2" <if condition="I('come_from') eq 2">selected</if> >ERP</option>
            </select>
			<input type="input-text" name="goods_name" id="goods_name" class="input-text " value="<{:I('goods_name')}>" style="width:150px;"  placeholder="商品名称">
			<input type="input-text" name="goods_no" id="goods_no" class="input-text "  value="<{:I('goods_no')}>" style="width:150px;"  placeholder="商品编码">

			日期范围:
			<input type="input-text" name="start_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="start_time"  value="<{:I('start_time')}>" class="input-text Wdate" style="width:160px;" value="<{:date('Y-m-d',time())}>"  placeholder="开始时间"> -
			<input type="input-text" name="end_time" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="end_time"  value="<{:I('end_time')}>" class="input-text Wdate" style="width:160px;"  value="<{:date('Y-m-d',time()+86400)}>"    placeholder="结束时间">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>
			<span class="btn linka">
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time())}>/end_time/<{:date('Y-m-d',time()+86400)}>" class="a">今天</a>
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time()-86400)}>/end_time/<{:date('Y-m-d',time())}>" class="a">昨天</a>
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time()-86400*7)}>/end_time/<{:date('Y-m-d',time())}>" class="a">最近7天</a>
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time()-86400*30)}>/end_time/<{:date('Y-m-d',time())}>" class="a">最近30天</a>
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time()-86400*30*6)}>/end_time/<{:date('Y-m-d',time())}>" class="a">最近半年</a>
				<a href="__URL__/pushorder/start_time/<{:date('Y-m-d',time()-86400*365)}>/end_time/<{:date('Y-m-d',time())}>" class="a">最近一年</a>
			</span>
		</form>
    </div>
</div>
<div id="container" style="width: 98%; height: 400px; margin: 0 auto;float:left;"></div>
<div style="float:left;width:49%;margin:10px 0;margin-left:15px;">
	<table class="table table-border table-bordered table-bg" style="width:98%;float:left;">
		<thead>
			<tr>
				<th scope="col" colspan="3">时间列表
				</th>
			</tr>
			<tr class="text-c">
				<th>序号</th>
				<th>时间</th>
				<th width="">订单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_t" id="vo">
			<tr class="text-c">
				<td><{$i}></td>
				<td><{$vo.t_time}></td>
				<td><{$vo.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td><{$count_all}></td>
			</tr>	
		</tbody>
	</table>
	<table class="table table-border table-bordered table-bg" style="width:98%;margin-top:10px;float:left;">
		<thead>
			<tr>
				<th scope="col" colspan="3">平台列表
				</th>
			</tr>
			<tr class="text-c">
				<th>序号</th>
				<th>来源平台</th>
				<th>订单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_comefrom" id="vs">
			<tr class="text-c">
				<td><{$i}></td>
				<td>
				<if condition="$vs['come_from'] eq 1">
					vxmore
				<elseif condition="$vs['come_from'] eq 2" />
					ERP
				<else />
					未知来源
				</if>
				</td>
				<td><{$vs.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td><{$count_all}></td>
			</tr>			
		</tbody>
	</table>
	<table class="table table-border table-bordered table-bg" style="width:98%;margin-top:10px;float:left;">
		<thead>
			<tr>
				<th scope="col" colspan="3">快递列表
				</th>
			</tr>
			<tr class="text-c">
				<th>序号</th>
				<th>快递公司名称</th>
				<th>订单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_logistics_business" id="vss">
			<tr class="text-c">
				<td><{$i}></td>
				<td>
				<if condition="$vss['logistics_business'] eq 1">
					百世
				<elseif condition="$vss['logistics_business'] eq 2" />
					顺丰
				<else />
					未知来源
				</if>
				</td>
				<td><{$vss.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td><{$count_all}></td>
			</tr>			
		</tbody>
	</table>
</div>
<div style="float:left;width:49%;margin:10px 0;margin-left:15px;">
	<table class="table table-border table-bordered table-bg" style="width:98%;float:right;">
		<thead>
			<tr>
				<th scope="col" colspan="4">商品列表
				</th>
			</tr>
			<tr class="text-c">
				<th>序号</th>
				<th>商品编码</th>
				<th width="">商品名称</th>
				<th width="">订单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_goods" id="vo">
			<tr class="text-c">
				<td><{$i}></td>
				<td><{$vo.goods_no}></td>
				<td><{$vo.goods_name}></td>
				<td><{$vo.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td></td>
				<td><{$count_all}></td>
			</tr>			
		</tbody>
	</table>
	<table class="table table-border table-bordered table-bg" style="width:98%;margin-top:10px;float:right;">
		<thead>
			<tr>
				<th scope="col" colspan="4">商家列表
				</th>
			</tr>
			<tr class="text-c">
				<th>序号</th>
				<th>时间</th>
				<th width="">订单数量</th>
				<th width="">订单数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list_company" id="vo">
			<tr class="text-c">
				<td><{$i}></td>
				<td><{$vo.company_code}></td>
				<td><{$vo.company_name}></td>
				<td><{$vo.t_count}></td>
			</tr>
			</volist>
			<tr class="text-c">
				<td>合计</td>
				<td></td>
				<td></td>
				<td><{$count_all}></td>
			</tr>			
		</tbody>
	</table>
</div>
<script language="JavaScript">
$(document).ready(function() {
   var chart = {
      type: 'area'
   };
   var title = {
      text: ''   
   };

   var xAxis = {
      categories: ["<{$categories}> ],
      tickmarkPlacement: 'on',
      title: {
         enabled: false
      }
   };
   var yAxis = {
      title: {
         text: '数量'
      },
      labels: {
         formatter: function () {
            return this.value / 1000 + 'k';
         }
      }
   };

   var plotOptions = {
      area: {
         marker: {
            enabled: false,
            symbol: 'circle',
            radius: 2,
            states: {
               hover: {
                 enabled: true
               }
            }
         }
      }
   };
   var series= [{
         name: '订单',
         data: [<{$datas}>],
		 }
   ];     
      
   var json = {};   
   json.chart = chart; 
   json.title = title;   


   json.xAxis = xAxis;
   json.yAxis = yAxis;  
   json.series = series;
   json.plotOptions = plotOptions;
   $('#container').highcharts(json);
  
});
</script>
<!-- <include file="Public/footer" /> -->
<include file="Public/footer_js" />
</body>
</html>